/*
 * @Author: zqx me_zqx@163.com
 * @Date: 2025-06-26 14:51:01
 * @LastEditors: zqx me_zqx@163.com
 * @LastEditTime: 2025-06-26 17:58:08
 * @FilePath: /XMate-h5/src/services/minutes/study.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { http } from "@/utils/http";

// 获取学习包
export const getUserkngAPI = (conferenceId: string) => {
    return http.request({
        url: `/rest/api/userkng/conference/${conferenceId}`,
        method: "GET",
         useOriginRes: true
    });
}

// 生成学习课程
export const generateCourseAPI = (conferenceId: string) => {
    return http.request({
        url: `/rest/api/aichat/conference/${conferenceId}/sales/improvement`,
        method: "GET",
        useOriginRes: true
    });
}

// 获取视频地址
export const getPlayInfoAPI = (fileId: string) => {
    return http.request({
        url: `/rest/api/xmatefile/getPlayInfo?fileId=${fileId}&clientType=1`,
        method: "GET",
        useOriginRes: true
    });
}

// 更新课件学习状态
export const updateCourseStudyStatusAPI = (packageId: string, kngId: string, status: string) => {
    return http.request({
        url: `/rest/api/userkng/study`,
        method: "POST",
        useOriginRes: true,
        data: {
            packageId,
            kngId,
            status
        }
    });
}

// 获取能力提升要素
export const getImprovementAPI = () => {
    return http.request({
        url: `/rest/api/userkng/check/factor`,
        method: "GET"，
        useOriginRes: true
    });
}
